package org.dizena.common.logger.bean;

import org.dizena.common.base.enums.EnumLogLevel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;

public class LogLocEvent extends ApplicationEvent {
    private final LogInfo logInfo;
    private final EnumLogLevel level;
    private final Logger logger;

    public LogLocEvent(Object source, LogInfo logInfo, EnumLogLevel levelEnum) {
        super(source);
        this.logInfo = logInfo;
        this.level = levelEnum;
        this.logger = LoggerFactory.getLogger(source.getClass());
    }

    public LogInfo getLogInfo() {
        return logInfo;
    }

    public EnumLogLevel getLevelEnum() {
        return level;
    }

    public Logger getLogger() {
        return logger;
    }
}
